package wili.exp.simple;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import wili.c.Ca;

public class Sfun extends Sexp {
	String name;
	List<Sexp> args;

	public String toString() {
		return toNumString(null);
	}

	@Override
	public String toNumString(Map cont) {
		return name + "(" + args.stream().map(e -> e.toNumString(cont)).collect(Collectors.joining(", ")) + ")";
	}

	public Sfun(Node nod) {
		super("");
		this.name = nod.sons.get(0).text;
	}

	@Override
	public Boolean isTrue(Map cont) {
		Ca.asert(false, "todo");
		return null;
	}

	@Override
	public Number value(Map cont) {
		Ca.asert(false, "todo");
		return null;
	}
}